package com.homework.action;

import java.sql.SQLException;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.homework.service.HomeworkService;

public class HomeworkAddAction {
	private String homeworkId;
	private HomeworkService homeworkService = new HomeworkService();

	public String getHomeworkId() {
		return homeworkId;
	}

	public void setHomeworkId(String homeworkId) {
		this.homeworkId = homeworkId;
	}
	//作业列表_学生
	public String homeworkGet() throws SQLException {
		String batch = homeworkService.getBatchOfHomeworkT(homeworkId);
		HttpServletRequest request = ServletActionContext.getRequest();
		request.setAttribute("batch", batch);
		return "Success";
	}
}
